﻿
Partial Class Controls_ContactControl
    Inherits System.Web.UI.UserControl

    Protected Sub txtName_TextChanged(sender As Object, e As EventArgs) Handles txtName.TextChanged
        LblName.Text = txtName.Text

    End Sub

    Protected Sub txtemail_TextChanged(sender As Object, e As EventArgs) Handles txtemail.TextChanged
        LblEmail.Text = txtemail.Text

    End Sub

    Protected Sub DropDownList1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DropDownList1.SelectedIndexChanged
        LblCategory.Text = DropDownList1.SelectedValue.ToString

    End Sub

    Protected Sub txtMsg_TextChanged(sender As Object, e As EventArgs) Handles txtMsg.TextChanged
        Dim st As String = txtMsg.Text
        Dim lth As Integer = txtMsg.Text.Length

        If lth <= 50 Then
            LblMessage.Text = st
        Else
            LblMessage.Text = Mid(st, 1, 10) + "......" + Mid(st, (lth - 6), lth)

        End If
    End Sub
End Class
